﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Stonecode.Solar.ParticleEngine.SettingsTemplate
{
    /// <summary>
    /// Do not use. This is an old template
    /// </summary>
    [Obsolete()]
    public static class SparkSettings
    {
        public static uint MaxParticles = 2000;

        public static string TextureName = "LensFlare"; 

        public static TimeSpan Duration = TimeSpan.FromSeconds(5);

        public static float MinHorizontalVelocity = -2;
        public static float MaxHorizontalVelocity = 2;

        public static float MinVerticalVelocity = 1;
        public static float MaxVerticalVelocity = 40;

        // Create a wind effect by tilting the gravity vector sideways.
        public static Vector3 Gravity = new Vector3(0, -30, 0);

        public static float EndVelocity = 1f;

        public static float MinRotateSpeed = -1;
        public static float MaxRotateSpeed = 1;

        public static float MinStartSize = 10;
        public static float MaxStartSize = 10;

        public static float MinEndSize = 10;
        public static float MaxEndSize = 10;
        public static Color MaxColor = Color.Orange;
        public static Color MinColor = Color.Yellow;

        public static void CreateSettings(out EmitterSettings pSettings)
        {
            pSettings = new EmitterSettings(MaxParticles);
            pSettings.TextureName = TextureName;

            pSettings.Duration = Duration;

            pSettings.MinHorizontalVelocity = MinHorizontalVelocity;
            pSettings.MaxHorizontalVelocity = MaxHorizontalVelocity;

            pSettings.MinVerticalVelocity = MinVerticalVelocity;
            pSettings.MaxVerticalVelocity = MaxVerticalVelocity;

            
            pSettings.Gravity = Gravity;

            pSettings.EndVelocity = EndVelocity;

            pSettings.MinRotateSpeed = MinRotateSpeed;
            pSettings.MaxRotateSpeed = MaxRotateSpeed;

            pSettings.MinStartSize = MinStartSize;
            pSettings.MaxStartSize = MaxStartSize;

            pSettings.MinEndSize = MinEndSize;
            pSettings.MaxEndSize = MaxEndSize;
            pSettings.MaxColor = MaxColor;
            pSettings.MinColor = MinColor;
        }

    }
}
